package com.guigu.qingcheng.mapper;

import com.guigu.qingcheng.pojo.TbUser;
import com.guigu.qingcheng.pojo.vo.NewuserVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.Map;

public interface TbUserMapper extends Mapper<TbUser> {
    /**
     * 查询所有会员
     * @return
     */
    @Select("SELECT COUNT(*) sumuser FROM tb_user WHERE user_level!=''\n")
    public Map finduser();
    /**
     * 查询新增
     * @return
     */
    @Select("SELECT COUNT(*) newuser FROM tb_user WHERE created " +
            "BETWEEN #{newuserVo.date1} AND #{newuserVo.date2}")
    public Map findnewuser(@Param("newuserVo") NewuserVo newuserVo);
}